Skip to content

Fix typo in Rust tree traversal #336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2018

Conversation

berquist
Copy link
Member

@berquist berquist commented Aug 5, 2018

Creating trees is also more consistent with the Julia implementation.

@Gathros Gathros added the Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.) label Aug 5, 2018
println!("Recursive DFS BTree:");
dfs_recursive_inorder_btree(&root);
println!("Recursive in-order DFS BTree:");
let root_binary = create_tree(3, 2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just have one tree.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to test the in-order, you need a binary tree. The other tree is ternary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just keep the other tree binary too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Julia code and chapter show examples with ternary, though. Not a big deal to me, but I'm not actually reviewing the code, just answering one question :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right it, should match the julia code.

@Gathros Gathros merged commit 5dd7fce into algorithm-archivists:master Aug 5, 2018
@berquist berquist deleted the tree-traversal-rust branch August 5, 2018 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants